/*
 * PostModePacketSender.java
 *
 * Created on January 27, 2007, 10:22 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package net.sf.iSnake.server;

import net.sf.iSnake.core.ClientNetworkInterface;

/**
 *
 * @author Suraj
 */
class PostModePacketSender extends Thread{
    private ServerCorePost scPost;
    /**Creates a instance of the PostModePacketSender
     *@param scp An instance of serverCorePost
     */
    public PostModePacketSender(ServerCorePost scPost){
        this.scPost=scPost;
        this.start();
    }
    
    public void run(){
        while(scPost.getServerPre().isPostMode()){
            try {
                this.sleep(150);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            }
            if(scPost.getServerPre().isPostMode()){
                scPost.sendDxDy();
            }
        }
    }
}
